//1.请求医院列表 所有的类型
//医院列表中 获取分页列表请求的参数中的params的类型
export interface getHosListSearchParamsType {
  hoscode?: string,
  hosname?: string,
  hostype?: string,
  provinceCode?: string,
  cityCode?: string,
  districtCode?: string,
  status?: 0 | 1,
}

//提取 医院详情中 根据id获取医院列表返回值中bookingRule的类型
export interface getHospitalListIdBookinRule {
  cycle: number,
  releaseTime: string,
  stopTime: string,
  quitDay: number,
  quitTime: string,
  rule: string[]
}

//获取医院列表请求的返回的content数组中 每一项的类型
export interface hospitalListItemsType {
  id: string,
  createTime: string,
  updateTime: string,
  isDeleted: number,
  param: {
    hostypeString: string,
    fullAddress: string
  },
  hoscode: string,
  hosname: string,
  hostype: string,
  provinceCode: string,
  cityCode: string,
  districtCode: string,
  address: string,
  logoData: string,
  intro: string,
  route: string,
  status: 0 | 1,
  bookingRule: {
    cycle: number,
    releaseTime: string,
    stopTime: string,
    quitDay: number,
    quitTime: string,
    rule: string[]
  } | null
}

//获取医院列表请求的返回的content的类型
export type getHosListReqContentType = hospitalListItemsType[]

//获取医院列表请求的返回值的完整类型
export interface getHosListReqReturnType {
  content: getHosListReqContentType,
  pageable: {
    sort: {
      sorted: boolean,
      unsorted: boolean,
      empty: boolean
    },
    pageNumber: number,
    pageSize: number,
    offset: number,
    paged: boolean,
    unpaged: boolean
  },
  totalElements: number,
  totalPages: number,
  last: boolean,
  first: boolean,
  sort: {
    sorted: boolean,
    unsorted: boolean,
    empty: boolean
  },
  numberOfElements: number,
  size: number,
  number: number,
  empty: boolean
}




//2.医院列表中三级联动的请求的返回值类型
export type getProvinceListReqReturn = getProvinceListItemType[]

//医院列表中三级联动的请求的返回值每一项的类型
export interface getProvinceListItemType {
  id: number,
  createTime: string
  updateTime: string,
  isDeleted: number,
  param: object,
  parentId: number,
  name: string,
  value: string,
  dictCode: string,
  hasChildren: boolean
}






//3.医院详情中 根据id获取医院列表请求的返回值的类型、
export interface getHospitalListIdReqReturn {
  bookingRule?: getHospitalListIdBookinRule,
  hospital?: hospitalListItemsType
}




//4.请求所有科室列表返回值的类型
export type getHosDepartmentReturnType = getHosDepartmentItemType[]

//请求所有科室列表返回值每一项的类型
export interface getHosDepartmentItemType {
  depcode: string,
  depname: string,
  children: getHosDepartmentReturnType | null
}




//5.排班规则请求参数类型
export interface getHosScheduleRuleParamsType {
  page: number, 
  limit: number, 
  hoscode: string, 
  depcode: string,
}

//排班规则请求返回值类型
export interface getHosScheduleRuleReturnType {
  total: number
  bookingScheduleList: bookingScheduleListType
  baseMap: {
    hosname: string
  };
}

//排班规则请求返回值中bookingScheduleList的类型 
export type bookingScheduleListType = bookingScheduleListItemType[]

//排班规则请求返回值中bookingScheduleList的每一项类型 
export interface bookingScheduleListItemType {
  workDate: string;
  workDateMd: null;
  dayOfWeek: string;
  docCount: number;
  reservedNumber: number;
  availableNumber: number;
  status: null;
}




//6.排班规则详细信息参数的类型
export interface getHosScheduleMessageParamsType {
  hoscode: string,
  depcode: string, 
  workDate: string
}

//排班规则详细信息返回值的类型
export type getHosScheduleMessageReturnType = []

//排班规则详细信息返回值的每一项的类型
export interface getHosScheduleMessageItemType {
  id: string;
  createTime: string;
  updateTime: string;
  isDeleted: number;
  param: {
    dayOfWeek: string;
    depname: string;
    hosname: string;
  };
  hoscode: string;
  depcode: string;
  title: string;
  docname: string;
  skill: string;
  workDate: string;
  workTime: number;
  reservedNumber: number;
  availableNumber: number;
  amount: number;
  status: 0 | 1;
  hosScheduleId: string;
}

